package com.css.zfzx.fwsjcj.modules.app.repository;

import com.css.zfzx.fwsjcj.modules.app.entity.FwAppVersionEntity;
import com.querydsl.jpa.impl.JPAQueryFactory;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.query.Param;
import org.springframework.stereotype.Repository;

@Repository
public interface AppRepository extends JpaRepository<FwAppVersionEntity,String> {
    @Query(nativeQuery = true,value = "select *,max(CREATE_TIME) from fwsjcj.fw_app_version where APP_TYPE = :type")
    FwAppVersionEntity findByType(@Param("type") String type);
}
